package com.tool4j.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 代码生成模板信息表
 *
 * @author Deng.Weiping
 * @since 2023-11-24 09:02:30
 */
@Data
@TableName("t_template_file")
public class TemplateFile implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private String key;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long templateId;

    /**
     * 文件名称
     */
    private String fileName;

    /**
     * 路径
     */
    private String filePath;

    /**
     * 是否叶子节点
     */
    private Boolean leaf;

    /**
     * md5
     */
    private String md5;

    /**
     * 文件内容
     */
    @TableField(exist = false)
    private String content;

}